package com.hgw.Demo11_VisitorPattern.examples;

/**
 * Data time:2021/12/21 20:22
 * StudentID:2019112118
 * Author:hgw
 * Description: 全职员工类，充当具体元素类
 */
public class FulltimeEmployee implements Employee {
    private String name;         // 员工姓名
    private double weeklyWage;   // 员工周薪
    private int workTime;        // 员工时间

    public FulltimeEmployee(String name, double weeklyWage, int workTime) {
        this.name = name;
        this.weeklyWage = weeklyWage;
        this.workTime = workTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getWeeklyWage() {
        return weeklyWage;
    }

    public void setWeeklyWage(double weeklyWage) {
        this.weeklyWage = weeklyWage;
    }

    public int getWorkTime() {
        return workTime;
    }

    public void setWorkTime(int workTime) {
        this.workTime = workTime;
    }

    public void accept(Department handler) {
        handler.visit(this);    // 调用访问者的访问方法
    }
}
